package Views;

import Source.DisplayDeleteAirport;
import UCM.UCDisplayDeleteAirport;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JPanel;

/**
 *
 * @author Joshua King
 */
public class ViewDisplayDeleteAirport extends JPanel{
    protected JButton deleteAirportButton = new JButton("DeleteA Airport");
    private final UCDisplayDeleteAirport UCDisplayDeleteAirport = new UCDisplayDeleteAirport(this);
    private DisplayDeleteAirport model;

    public ViewDisplayDeleteAirport() {
        setLayout(new FlowLayout());
        add(deleteAirportButton);
        deleteAirportButton.addActionListener(new AdapterUCCToAL(UCDisplayDeleteAirport));
    }

    public void loadTo(DisplayDeleteAirport model) {
        this.model = model;
    }

    public void setDeleteAirportVisible() {
        ViewMain.getInstance().updateDeleteAirport(model.getStr());
    }
}
